package cn.zn.modules.budget.his.controller;

import cn.zn.modules.budget.his.entity.BudgetInfoSum;
import cn.zn.modules.budget.his.entity.dto.BudgetInfoSumDTO;
import cn.zn.modules.budget.his.service.BudgetInfoSumService;
import cn.zn.framework.common.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("budget/his/budgetinfosum")
public class BudgetInfoSumController {

    @Autowired
    BudgetInfoSumService budgetInfoSumService;

    @RequestMapping("sumList")
    public Result<Iterable<BudgetInfoSum>> sumList(@Valid @RequestBody BudgetInfoSumDTO budgetInfoSumDTO) {
        Iterable<BudgetInfoSum> sum = budgetInfoSumService.findSum(budgetInfoSumDTO);
        return Result.ok(sum);
    }

}
